#include <iostream>

using namespace std;
const int N = 1e5 + 10;
int p[N], s[N];

void merge_sort(int p[], int l, int r)
{
    if(l >= r) return;

    int mid = l + r >> 1;

    merge_sort(p, l, mid), merge_sort(p, mid + 1, r);

    int i = l, j = mid + 1, k = 0;
    while(i <= mid && j <= r)
      if(p[i] <= p[j]) s[k++] = p[i++];
       else s[k++] = p[j++];
    while(i <= mid) s[k++] = p[i++];
    while(j <= r) s[k++] = p[j++];

    for(int i = l, j = 0; i <= r; i++, j++) p[i] = s[j];
}

int main()
{
    int n;
    cin >> n;
    for(int i = 0; i < n; i++) scanf("%d", &p[i]);

    merge_sort(p, 0, n - 1);

    for(int i = 0; i < n; i++) printf("%d ", p[i]);

    return 0;
}
